package com.eh.factory.factoryMethod.store;

import com.eh.factory.factoryMethod.pizza.Pizza;

/**
 * Created by David on 2016/4/26.
 */
public abstract class PizzaStore {
    public final Pizza orderPizza(String type) {
        Pizza pizza = create(type);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }

    protected abstract Pizza create(String type);
}
